package com._21cn.cms.yellow.entity;

import com._21cn.cms.common.Constants;
import com._21cn.framework.utils.StringUtil;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class YellowPage
        implements Serializable
{
    private static final long serialVersionUID = -1L;
    private Integer id;
    private Integer provinceId = 0;
    private Integer cityId = 0;
    private Integer areaId = 0;
    private String name;
    private String nameShort;
    private String mainProduct;
    private String mainUrl;
    private String firstPicUrl;
    private String introduce;
    private String address;
    private String linePhone;
    private String telPhone;
    private String contactMan;
    private String email;
    private String postCode;
    private String faxCode;
    private String qq;
    private String wxin;
    private String wxinQrCode;
    private String longPos;
    private String dimPos;
    private Integer status = Constants.STATUS_ENABLE;
    private Integer topTime;
    private Date createTime = new Date();
    private Date modifyTime = new Date();
    private Integer createUserId = 0;
    private Integer modifyUserId = 0;
    private List<YellowPagePicture> yellowPagePictureList = new ArrayList();
    private List<Integer> cateIdList = new ArrayList();
    private String position = "";

    public String getPosition() {
        if ((!StringUtil.isEmpty(this.longPos)) &&
                (!StringUtil.isEmpty(this.dimPos)))
        {
            return this.longPos + "," + this.dimPos;
        }
        return "";
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getFirstPicUrl() {
        return this.firstPicUrl;
    }

    public String getFirstPicUrl( String code ) {
        firstPicUrl = getFirstPicUrl();
        if (StringUtil.isImageFile(firstPicUrl)) {
            try {
                String[] thumbAry = firstPicUrl.split("/");
                String imgSize = thumbAry[(thumbAry.length - 2)];
                firstPicUrl = firstPicUrl.replaceFirst("/" + imgSize + "/", "/" + code + "/");
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        return this.firstPicUrl;
    }

    public void setFirstPicUrl(String firstPicUrl) {
        this.firstPicUrl = firstPicUrl;
    }

    public String getWxin() {
        return this.wxin;
    }

    public void setWxin(String wxin) {
        this.wxin = wxin;
    }

    public String getWxinQrCode() {
        return this.wxinQrCode;
    }

    public void setWxinQrCode(String wxinQrCode) {
        this.wxinQrCode = wxinQrCode;
    }

    public List<YellowPagePicture> getYellowPagePictureList() {
        return this.yellowPagePictureList;
    }

    public void setYellowPagePictureList(List<YellowPagePicture> yellowPagePictureList) {
        this.yellowPagePictureList = yellowPagePictureList;
    }

    public List<Integer> getCateIdList() {
        return this.cateIdList;
    }

    public void setCateIdList(List<Integer> cateIdList) {
        this.cateIdList = cateIdList;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public Integer getId() {
        return this.id;
    }

    public void setProvinceId(Integer provinceId) {
        this.provinceId = provinceId;
    }
    public Integer getProvinceId() {
        return this.provinceId;
    }

    public void setCityId(Integer cityId) {
        this.cityId = cityId;
    }
    public Integer getCityId() {
        return this.cityId;
    }

    public void setAreaId(Integer areaId) {
        this.areaId = areaId;
    }
    public Integer getAreaId() {
        return this.areaId;
    }

    public void setName(String name) {
        this.name = name;
    }
    public String getName() {
        return this.name;
    }

    public void setNameShort(String nameShort) {
        this.nameShort = nameShort;
    }
    public String getNameShort() {
        return this.nameShort;
    }

    public void setMainProduct(String mainProduct) {
        this.mainProduct = mainProduct;
    }
    public String getMainProduct() {
        return this.mainProduct;
    }

    public void setMainUrl(String mainUrl) {
        this.mainUrl = mainUrl;
    }
    public String getMainUrl() {
        return this.mainUrl;
    }

    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }
    public String getIntroduce() {
        return this.introduce;
    }

    public void setAddress(String address) {
        this.address = address;
    }
    public String getAddress() {
        return this.address;
    }

    public void setLinePhone(String linePhone) {
        this.linePhone = linePhone;
    }
    public String getLinePhone() {
        return this.linePhone;
    }

    public void setTelPhone(String telPhone) {
        this.telPhone = telPhone;
    }
    public String getTelPhone() {
        return this.telPhone;
    }

    public void setContactMan(String contactMan) {
        this.contactMan = contactMan;
    }
    public String getContactMan() {
        return this.contactMan;
    }

    public void setEmail(String email) {
        this.email = email;
    }
    public String getEmail() {
        return this.email;
    }

    public void setPostCode(String postCode) {
        this.postCode = postCode;
    }
    public String getPostCode() {
        return this.postCode;
    }

    public void setFaxCode(String faxCode) {
        this.faxCode = faxCode;
    }
    public String getFaxCode() {
        return this.faxCode;
    }

    public void setQq(String qq) {
        this.qq = qq;
    }
    public String getQq() {
        return this.qq;
    }

    public void setLongPos(String longPos) {
        this.longPos = longPos;
    }
    public String getLongPos() {
        return this.longPos;
    }

    public void setDimPos(String dimPos) {
        this.dimPos = dimPos;
    }
    public String getDimPos() {
        return this.dimPos;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
    public Integer getStatus() {
        return this.status;
    }

    public void setTopTime(Integer topTime) {
        this.topTime = topTime;
    }
    public Integer getTopTime() {
        return this.topTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Date getCreateTime() {
        return this.createTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }
    public Date getModifyTime() {
        return this.modifyTime;
    }

    public void setCreateUserId(Integer createUserId) {
        this.createUserId = createUserId;
    }
    public Integer getCreateUserId() {
        return this.createUserId;
    }

    public void setModifyUserId(Integer modifyUserId) {
        this.modifyUserId = modifyUserId;
    }
    public Integer getModifyUserId() {
        return this.modifyUserId;
    }
}